//
//  ViewController+extension.swift
//  UUCartoon
//
//  Created by Galaxy on 2022/8/19.
//  Copyright © 2022 qykj. All rights reserved.
//

import Foundation
import UIKit
extension UIViewController{
    func setNavColor(navColor:UIColor,titleColor:UIColor,barStyle:UIBarStyle) {        
        let barApp = UINavigationBarAppearance.init()
        barApp.configureWithOpaqueBackground()
        barApp.backgroundColor = navColor
        barApp.titleTextAttributes = [NSMutableAttributedString.Key.foregroundColor:titleColor]
        barApp.shadowImage = UIImage.createImage(color: .clear, size: CGSize(width: screenW, height: 1))
        barApp.backgroundImage = UIImage.createImage(color: .clear, size: CGSize(width: screenW, height: 1))
        navigationController?.navigationBar.standardAppearance = barApp
        navigationController?.navigationBar.scrollEdgeAppearance = barApp
        
    }
}
